package com.mask.im.business.controller;
import com.mask.im.business.model.dto.FriendFeedMessageDTO;
import com.mask.im.business.common.model.RestResponse;
import com.mask.im.business.service.FriendFeedMessageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "好友动态消息")
@RestController
public class FriendFeedMessageController{

	@Autowired
	private FriendFeedMessageService friendFeedMessageService;

	@ApiOperation("获取自己的动态消息")
	@GetMapping("/users/friendFeedMessage")
	public RestResponse<List<FriendFeedMessageDTO>> friendFeedMessageList(){
		return friendFeedMessageService.friendFeedMessageList();
	}

	@ApiOperation("获取动态未读消息数量")
	@GetMapping("/users/friendFeedMessageCount")
	public RestResponse<Integer> friendFeedMessageCount(){
		return friendFeedMessageService.friendFeedMessageCount();
	}

	@ApiOperation("消息已读")
	@PutMapping("/users/friendFeedMessage/read")
	public RestResponse<String> friendFeedMessageRead(){
		return friendFeedMessageService.friendFeedMessageRead();
	}
}

